1. Field of the Invention
The present invention relates generally to an improved data processing system and, more specifically, to a computer-implemented method, a data processing system, and a computer program product for hybrid push/pull of continuous structured query language (SQL) queries.
2. Description of the Related Art
Event monitoring systems are used in various business domains, such as health care, business process monitoring, financial applications, and environment protection, to name a few. Event monitoring systems are based on the notion of continuous queries, which seek patterns of events occurring in a particular time sequence and usually within a user-specified time interval. For example, a continuous query in the financial domain would monitor for a condition of a rapid decline in a stock price of a company by some predetermined amount within a defined time span, followed by another similar decline no later than some predefined number of hours after the initial decline was observed.
Existing systems evaluate continuous queries using either a data push or data pull strategy. In the data push, or eager evaluation strategy, a stream processing engine uses main memory resident state automata to process each incoming event as the event arrives. The advantage of this method is that the method can notify the user as soon a match between the event and predetermined criteria are found. The drawback, however, is that the amount of state information that can be maintained is limited by the available memory.
To overcome this limitation, a data pull, or lazy evaluation strategy is implemented. The data pull strategy consists of storing all incoming events in a data base management system (DBMS) and simulating the continuous query by periodically querying the data base management system. An important factor involves determining when the queries to the data base management system should be triggered. Overloading the data base management system is not practical. When queries are submitted too often, especially since most of the time they will not produce new results, an overload occurs.
On the other hand, if queries are sent infrequently, the user may be notified of an interesting event pattern too late to respond. A need therefore exists to determine when such queries are most likely to produce new results.